using System.Collections.Generic;

namespace IQIGame.Onigao.GamePlay
{
    public class DynMainCityPlayerAvatar : BaseDynMainCityEntity
    {
        private HashSet<MainCityOccupation> _occupationState = new();

        public override int id => 1; //实体的id固定从EditorLevelConst.GenerateIdStart(100000)开始
        public override int mcid => 0;
        public override int mapSymbolCid => TableCenter.mapUiEntity.PlayerCid;
        public override IReadOnlyList<int> offeredQuests => null;
        public bool isOccupied => _occupationState.Count > 0;

        public DynMainCityPlayerAvatar()
        {

        }

        public void SetOccupation(MainCityOccupation op, bool value)
        {
            if (value)
            {
                _occupationState.Add(op);
            }
            else
            {
                _occupationState.Remove(op);
            }
        }
    }
}
